<?php

/**
 * Get ID Video From Url Youtube
 * @param string $url
 * @return string
 */
function get_youtube_id($url) {
    parse_str(parse_url($url, PHP_URL_QUERY), $my_array_of_vars);
    echo $my_array_of_vars['v'];
}